import { useState } from 'react';

import WithCounter from './WithCounter';

const ClickCounter = (props: any) => {
  // const [count, setCount] = useState(0);
  // const incrementCount = () => {
  //   setCount(count + 1);
  // };
  return (
    <div>
      <button onClick={props.incrementCount}>点击{props.count}次</button>
    </div>
  );
};

// export default ClickCounter;
export default WithCounter(ClickCounter);
